/*
 * @Author: 吴让坤
 * @Date: 2023-12-09 20:56:00
 * @LastEditTime: 2023-12-09 20:58:53
 * @Description: 描述
 */
import { resolve } from 'path';
import { defineConfig } from 'vite';

export default defineConfig({
  build: {
    lib: {
      entry: [
        resolve(__dirname, 'src/index.ts'),
      ],
      formats: ['es', 'cjs'],
      fileName: (format, name) => `${name}.${format}.js`,
    },
    sourcemap: true,
  },
  test: {
    environment: 'happy-dom',
  },
});